package com.ruoyi.report.controller.report;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.report.domain.HanZaiBusinessDetails;
import com.ruoyi.report.service.HanZaiBusinessDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: 憨憨爱崽崽
 * Name: HanZaiBusinessDetailsController 业主资料明细
 * Date: 2022/4/26
 * Time: 8:41
 **/
@RestController
@RequestMapping("/business_details")
public class HanZaiBusinessDetailsController extends BaseController {
    @Autowired
    private HanZaiBusinessDetailsService businessDetailsService;


    @RequestMapping("/details/list")
    public TableDataInfo getBusinessDetailsList(HanZaiBusinessDetails businessDetails){
        startPage();
        List<HanZaiBusinessDetails> hanZaiBusinessDetails = businessDetailsService.selectBusinessDetails(businessDetails);
        int i = 1;
        for (HanZaiBusinessDetails details : hanZaiBusinessDetails){
            details.setBusinessId(i++);
        }
        System.out.println(hanZaiBusinessDetails);
        return getDataTable(hanZaiBusinessDetails);
    }
}
